home *** CD-ROM | disk | FTP | other *** search
- Uasmlst
-
- Ever use DEBUG to dis-assemble a file and sit around for
- hours doing a simetaneous dump to the printer, all the while
- wishing you could put it in a file instead, and them get down to
- actually editing the source code and re-assemblying, with you
- changes? Pipes and filters are the answer.
-
- The DOS manual says pipes "allow the screen output of one
- program to be used as the keyboard input to another
- program....and piping is the chaining of programs with automatic
- redirection of standard input and output."
-
- Well, exactly what is standard input and output? Keyboard
- and screen, respectively. The redirection of standard output is a
- cinch, just tell DOS to send the output to a disk file.
- Unfortunately, this kills the standard output to the screen, so
- you don't know what you are doing. Working in the dark, you might
- say. This is where the use of input redirection comes into play,
- why not create a script of debug commands, use that as standard
- input and kick back and let the script do all the work. This is
- how it can be done for creating a debug dis-assembly file.
-
- A>DEBUG
- -F CS:0100 L1000 "0" <=== Fills 1,000 bytes with hex "F"
- -Q
- A>DEBUG MYFILE.COM <=== Load the file to be dis-assembled
- -D <=== Dump the file, note addresses
- containing data, continue Dumping
- until you reach the end of the file
- (section when contains contigious
- FFFFFF's).
- -Q <=== Quit debug
- A>Copy con infile
- U addr1 addr2 <=== Start and stop address
- U addr3 addr4 <=== Start and stop address
- etc. <=== Until all code addresses are specified
- q <=== Tell debug to Quit
- Ctrl Z <=== End of file mark
-
- A>DEBUG MYFILE.COM <INFILE >OUTFILE
-
- Think of the pipes as funnels. In this case INFILE will be
- used in lieu of keyboard input to debug. All output that would
- normally be sent to the screen will be piped to a file called
- OUTFILE. Of course, the names of these files can be changed to
- any filename that you would like to use.
-
- You've now created a file which is identical to the
- unassembly that you would normally see on your screen. Edit the
- file to remove your script commands and submit it to the
- UASMLST.EXE program (which is contained on the current library
- disk). The program will then ask for the input file. Enter
- OUTFILE. When asked for the output file name enter a new
- filename, usually with a .ASM extension. The program will then
- read OUTFILE, eliminate the hex addresses on the left and assign
- labels (in the form Ln, where n = 1 - 999) for all jumps and
- calls, and send the results to the new file
-
- If you get an error message "Error: Referenced code not
- found:", it means that a jump or call was found which referenced
- an address not found in the input file. This means you missed
- portions of the code, you started unassembling in the middle of
- an instruction, you got into data areas, or (possibly) the code
- modifies itself during execution./g in the middle of
- an instruction, you got into data areas, or (possibly) the code
-